package com.uduew.sjd.api;

import static com.uduew.sjd.config.Const.ADD_BANK_INFO;
import static com.uduew.sjd.config.Const.APP_CONTROL;
import static com.uduew.sjd.config.Const.APP_CONTROL_BASE;

import androidx.annotation.NonNull;

import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestBodyStrategy;
import com.hjq.http.config.IRequestInterceptor;
import com.hjq.http.config.IRequestServer;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.RequestBodyType;
import com.hjq.http.request.HttpRequest;

import okhttp3.Request;
import okhttp3.Response;


public class AppControlApi implements IRequestApi, IRequestType, IRequestServer, IRequestInterceptor {

// "videoName":"13240445555"

    private String videoName;

    public AppControlApi setVideoName(String videoName) {
        this.videoName = videoName;
        return this;
    }
    @NonNull
    @Override
    public Request interceptRequest(@NonNull HttpRequest<?> httpRequest, @NonNull Request request) {
        return IRequestInterceptor.super.interceptRequest(httpRequest, request);
    }

    @NonNull
    @Override
    public Response interceptResponse(HttpRequest<?> httpRequest, Response response) {
        return IRequestInterceptor.super.interceptResponse(httpRequest, response);
    }


    @NonNull
    @Override
    public String getApi() {
        return APP_CONTROL;
    }

    /**
     * 获取参数的提交类型
     */
    @NonNull
    @Override
    public IRequestBodyStrategy getBodyType() {
        return RequestBodyType.JSON;
    }


    /**
     * 主机地址
     */
    @NonNull
    @Override
    public String getHost() {
        return APP_CONTROL_BASE;
    }
}

